package teamGiga.action;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpSession;

import action.servlet.ActionForWard;

public class MLogoutAction extends Action{
	
	private String path;
	private boolean redirect;
	
	
	public MLogoutAction() {
		super();
	}


	public MLogoutAction(String path, boolean redirect) {
		super();
		this.path = path;
		this.redirect = redirect;
	}


	@Override
	public ActionForWard execute(HttpServletRequest request,
			HttpServletResponse response) {
		// TODO Auto-generated method stub
		
		HttpSession session = request.getSession();
		session.invalidate();
		
		return new ActionForWard(path, redirect);
	}
	
	

}
